package com.unlcn.ils.kas.service.interfaceLog;

import com.unlcn.ils.kas.dao.mapper.order.KasInterfaceLogMapper;
import com.unlcn.ils.kas.dao.model.order.KasInterfaceLog;
import com.unlcn.ils.kas.dao.model.order.bo.InterfaceLogBo;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class InterfaceLogServiceImpl implements InterfaceLogService {

	@Autowired
	private KasInterfaceLogMapper kasInterfaceLogMapper;
	
	@Override
	public Integer insert(InterfaceLogBo record) {
		KasInterfaceLog kasInterfaceLog = new KasInterfaceLog();
		BeanUtils.copyProperties(record, kasInterfaceLog);
		int ret = kasInterfaceLogMapper.insert(kasInterfaceLog);
		record.setId(kasInterfaceLog.getId());
		return ret;
	}
	
	@Override
	public Integer update(InterfaceLogBo record){
		KasInterfaceLog kasInterfaceLog = new KasInterfaceLog();
		BeanUtils.copyProperties(record, kasInterfaceLog);
		int ret = kasInterfaceLogMapper.updateById(kasInterfaceLog);
		return ret;
	}

}
